﻿@namespace AntDesign
@inherits AntDomComponentBase

<div class="@ClassMapper.Class" style="@Style" id="@Id" @ref="Ref">
    <div class="ant-collapse-header" @onclick="OnHeaderClick" role="button" aria-expanded="@(Active?"true":"false")">
        @if (ShowArrow)
        {
            <div class="ant-collapse-expand-icon">
                @if (Collapse.ExpandIconTemplate != null)
                {
                    @Collapse.ExpandIconTemplate(Active)
                }
                else
                {
                    <Icon Type="@Collapse.ExpandIcon" Class="ant-collapse-arrow" Rotate="@(Active ? 90 : 0)" />
                }
            </div>
        }

        <div class="ant-collapse-header-text">
            @if (HeaderTemplate != null)@HeaderTemplate else @Header
        </div>

        @if (Extra != null || ExtraTemplate != null)
        {
            <div class="ant-collapse-extra">
                @if (ExtraTemplate != null)@ExtraTemplate else @Extra
            </div>
        }
    </div>
    <div class="@_contentClassMapper.Class" @ref="@_warpperRef" style="@_warpperStyle">
        <div class="ant-collapse-content-box">
            @ChildContent
        </div>
    </div>
</div>
